package com.hakim.wfb.customer.enums;

/**
 * Created by 小斌 on 2016/4/25 0025.
 */
public enum TerminalTypeEnum {

    APP(1, "APP"),
    H5(2, "H5"),
    WEB(3, "WEB");

//    1.安卓 2.苹果 3.H5 4.WEB

    /**
     * 值
     */
    private Integer code;
    /**
     * 注释
     */
    private String message;

    private TerminalTypeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static TerminalTypeEnum getByCode(int code) {
        for (TerminalTypeEnum type : values()) {
            if (type.getCode() == (code)) {
                return type;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public String toString() {
        return "TerminalTypeEnum{" +
                "key='" + code + '\'' +
                ", value='" + message + '\'' +
                '}';
    }
}
